{:W('Nav',array('name'=>'已完成需求登记'))}
<link href="__PUBLIC__/Js/js/calendar/calendar.css" rel="stylesheet" type="text/css" />
<div class="form-div">
    <form action="javascript:searchOrder()" name="searchForm">
        <img src="__PUBLIC__/Images/images/icon_search.gif" width="26" height="22" border="0" alt="SEARCH" />
        需求登记号<input name="order_sn" type="text" id="order_sn" size="15">
        收货人<input name="consignee" type="text" id="consignee" size="15">
        订单状态    <select name="status" id="status">
        <option value="-1">请选择...</option>
        <option value="0" selected>待确认</option><option value="100">待付款</option><option value="101">待发货</option><option value="102">已完成</option><option value="1">付款中</option><option value="2">取消</option><option value="3">无效</option><option value="4">退货</option><option value="6">部分发货</option>    </select>
        <input type="submit" value=" 搜索 " class="button" />
    </form>
</div>

<!-- 订单列表 -->
<form method="post" action="order.php?act=operate" name="listForm" onsubmit="return check()">
    <div class="list-div" id="listDiv">

        <table cellpadding="3" cellspacing="1">
            <tr>
                <th>订单号</th>
                <th>下单时间</th>
                <th>收货人</th>
                <!--<th>总金额</th>-->
                <th>应付金额</th>
                <th>订单状态</th>
                <th>处方单图片</th>
                <th>操作</th>
            </tr>
            <foreach name="rxArr" item="v">
                <tr>
                    <td><a href="{:U(GROUP_NAME.'/Order/orderInfo',array('orderId'=>$v['id'],'is_RX'=>true))}">{$v.order_sn}</a></td>
                    <td>{$v.add_time|date="Y-m-d H:i:s",###}</td>
                    <td>{$v.consignee_name}[TEL: {$v.telephone}] <br />{$v.consignee_address}</td>
                    <td>￥{$v.total}元</td>
                    <td>{$v.payment},<font name="{$v.id}">{$v.pay_status},{$v.order_status}</font></td>
                    <td><a href="{:U('/'.$v['rx_image'])}" target="_blank">审核处方 </a></td>
                    <td>
                        <a href="{:U(GROUP_NAME.'/Order/orderInfo',array('orderId'=>$v['id'],'is_RX'=>true))}">查看</a>
                    </td>
                </tr>
            </foreach>
        </table>


        <!-- 分页 -->

        <div class="mask-black" id="Mask" style="display:none"></div>
        <!--遮罩-->
    </div>
</form>

<script language="JavaScript">
    function chekcRX($id,$pass){
        var xmlhttp = new XMLHttpRequest();
        var act = "{:U(GROUP_NAME.'/Order/checkRx')}";
        xmlhttp.open("POST", act, false);
        xmlhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
        xmlhttp.send("id=" + $id+'&pass='+$pass);
        if (xmlhttp.responseText == true) {
            if($pass){
                document.getElementsByName($id)[0].innerText='审核通过，已确认';
                document.getElementsByName('check_'+$id)[0].innerText=' ';
            }else{
                document.getElementsByName($id)[0].innerText='审核不通过，已确认';
                document.getElementsByName('check_'+$id)[0].innerText=' ';
            }

        } else {
            alert('传输错误，请稍后重试');
        }
    }
</script>


</body>
</html>